<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //98.58%
    var checkRecord = function(s) {
        let arr = s.split('');
        if(arr.indexOf('A') != arr.lastIndexOf('A'))return false;
        if(s.includes('LLL'))return false;
        return true;
    };
    let s = "PPALLP";
    console.log(checkRecord(s));
    
</script>
</html>